import React, { Component } from 'react'
import {withRouter} from 'react-router-dom'
class Header extends Component {
  render() {
    return (
      <div>
        <div className="page-header"><h2>React Router Demo</h2></div>
        <button onClick={() => {this.props.history.goForward()}}>前进</button>
        <button onClick={() => {this.props.history.goBack()}}>后退</button>
      </div>
    )
  }
}
export default withRouter(Header)
